package com.itheima.consumer.feign;


import com.itheima.consumer.domain.Goods;
import org.springframework.stereotype.Component;

/**
 * feign客户端降级处理类
 *      1.定义实现类 Feign客户端接口
 *      2.使用@Component注解将该类的Bean注入到SpringIOC容器
 */

@Component
public class GoodsFeignClientFallback implements GoodsFeignClient {
    @Override
    public Goods findGoodsById(int id) {

        Goods goods = new Goods();
        goods.setTitle("有降级了....");

        return goods;
    }
}
